setLocation

fun setLocation(context: Context, lat: Double, lng: Double, appId: String? = null, attributeLevel: UserAttributeLevel = UserAttributeLevel.PROJECT)

Track user location as a User Attribute

Since

12.0.00

Parameters

lat

The latitude of the user location

lng

The longitude of the user location

appId

Account identifier, APP ID on the MoEngage Dashboard. If null, default instance will be used

attributeLevel

level at which the attribute has to be set

Throws

if the attribute level is UserAttributeLevel.PORTFOLIO but the project id is not configured during initialisation